/*
ID: icerupt1
PROG: frac1
LANG: C++11
*/
#include <fstream>
#include <iostream>
#include <algorithm>
#include <vector>

struct frac { int numerator; int denaminator; };

bool operator<(frac const & a, frac const & b)
{
	return (float)a.numerator / (float)b.denaminator <
				(float)b.numerator / (float)b.denaminator;
}

int n;

int gcd(int x, int y)
{
	return (y == 0) ? x : gcd(y, x % y);
}

bool simplest(int x, int y)
{
	return (gcd(x, y) == 1);
}

int main()
{
	std::ifstream fin {"frac1.in" };
	std::ofstream fout{"frac1.out"};

	fin >> n;
	std::vector<frac> ans{{0, 1}};

	for (int i = 1; i <= n; i++)
		for (int j = 1; j <= i; j++)
			if (simplest(j, i)) ans.push_back({j, i});

	std::sort(ans.begin(), ans.end());

	for (auto v : ans) {
		std::cout << v.numerator << '/' << v.denaminator << '\n';
		fout << v.numerator << '/' << v.denaminator << '\n';
	}
}
